//index.js
//获取应用实例
const app = getApp()
Page({
  data: {
    cardCur: 0,
    swiperList: [{
      id: 0,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg'
    }, {
      id: 1,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg',
    }, {
      id: 2,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg'
    }, {
      id: 3,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg'
    }, {
      id: 4,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25011.jpg'
    }, {
      id: 5,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big21016.jpg'
    }, {
      id: 6,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg'
    }],
    iconList: [{
      icon: 'cardboardfill',
      color: 'red',
      badge: 120,
      name: 'VR'
    }, {
      icon: 'recordfill',
      color: 'orange',
      badge: 1,
      name: '录像'
    }, {
      icon: 'picfill',
      color: 'yellow',
      badge: 0,
      name: '图像'
    }, {
      icon: 'noticefill',
      color: 'olive',
      badge: 22,
      name: '通知'
    }, {
      icon: 'upstagefill',
      color: 'cyan',
      badge: 0,
      name: '排行榜'
    }, {
      icon: 'clothesfill',
      color: 'blue',
      badge: 0,
      name: '皮肤'
    }, {
      icon: 'discoverfill',
      color: 'purple',
      badge: 0,
      name: '发现'
    }, {
      icon: 'questionfill',
      color: 'mauve',
      badge: 0,
      name: '帮助'
    }, {
      icon: 'commandfill',
      color: 'purple',
      badge: 0,
      name: '问答'
    }, {
      icon: 'brandfill',
      color: 'mauve',
      badge: 0,
      name: '版权'
    }],
    gridCol: 4,
    new: [
      {
        "title": "新闻大爆炸.....",
        "dateil": "大爆炸问题的一个简介内容。。",
        "img": "https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg",
        "icon": "王者荣耀"
      },
      {
        "title": "新闻大爆炸.....",
        "dateil": "大爆炸问题的一个简介内容。。",
        "img": "https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg",
        "icon": "英雄联盟"
      },
      {
        "title": "新闻大爆炸.....",
        "dateil": "大爆炸问题的一个简介内容。。",
        "img": "https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg",
        "icon": "热门"
      },
    ],
    modalName: ""
  },
  onLoad: function () {

  },
  DotStyle(e) {
    this.setData({
      DotStyle: e.detail.value
    })
  },
  // cardSwiper
  cardSwiper(e) {
    this.setData({
      cardCur: e.detail.current
    })
  },
  new_tap(e) {
    let that = this;
    console.log(e.currentTarget.dataset.index)
    let num = e.currentTarget.dataset.index + 1
    that.setData({
      modalName: "Image",
      num: num
    })
  },
  hideModal() {
    let that = this;
    that.setData({
      modalName: ""
    })
  }
})